package com.fjec.im.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fjec.common.protocol.JsonResult;
import com.fjec.im.entity.BizUserConversation;

/**
 * <p>
 * 012.用户会话表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-09-23
 */
public interface IBizUserConversationService extends IService<BizUserConversation> {

    /**
     * 获取会话列表
     *
     * @return
     */
    JsonResult getConvList(Page page);

    /**
     * 创建会话
     *
     * @param toId
     * @return
     */
    JsonResult createOrGetConversation(Long toId, Integer busiType, String shopName) throws Exception;

    /**
     * 根据Id获取会话
     *
     * @param id
     * @return
     */
    JsonResult getConversation(Long id);

    /**
     * 根据Id获取并更新会话
     *
     * @param id
     * @return
     */
    JsonResult getAndUpdateConversation(Long id) throws Exception;
}
